package collection;

import java.util.PriorityQueue;
import java.util.Queue;

public class PriorityQueueDemo {

	public static void main(String[] args) {
		Queue<String> que = new PriorityQueue<String>();
		
		que.offer("offer");
		que.add("add");
		que.add("another");
		
		System.out.println(que.poll());
		System.out.println(que.peek());
		System.out.println(que.poll());
		System.out.println("contains 'add': " + que.contains("add"));
		System.out.println("Size: " + que.size());
		
	}
	
}
